home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / c-tools / vbcc / machines / amiga68k / doc / vc.doc < prev    next >
Encoding:
Text File  |  1996-05-23  |  5.6 KB  |  152 lines

  1. vc - frontend for Amiga version of vbcc (c) in 1995-96 by Volker Barthelmann
  2.  
  3.  
  4. INTRODUCTION
  5.  
  6.     vc calls the preprocessor, compiler, assembler and linker.
  7.     It should be somewhat Unix cc compatible.
  8.  
  9.  
  10. LEGAL
  11.  
  12.     vc is (c) in 1995-96 by Volker Barthelmann. All code is written by me
  13.     and may be freely redistributed as long as no modifications are made
  14.     and nothing is charged for it.
  15.  
  16.  
  17. INSTALLATION
  18.  
  19.     This may change in following versions.
  20.  
  21.     First do not set your stack too low. I have not tested how much stack
  22.     vbcc needs, some 10k will probably be enough.
  23.  
  24.     At the moment vc calls an external preprocessor, so this one must be
  25.     in the path and you probably have to tell the preprocessor the
  26.     directories that contain the vbcc includes (and the os includes, if you
  27.     have them) - this depends on the preprocessor you chose.
  28.  
  29.     vbcc, FreePhxAss and your linker must also be in the path and vlib: must
  30.     be assigned to vbcc's lib directory (vbcc/machines/amiga68k/lib).
  31.  
  32.     Also you should assign vbcc: to a directory and/or put a config file
  33.     (see CONFIG) in vbcc: or env:. If you do neither of this, you will get
  34.     an annoying requester even if you use the default config of vc.
  35.  
  36.     In the default configuration, vc will call vcpp as preprocessor,
  37.     FreePhxAss as assembler and PhxLnk as linker.
  38.     You probably do not have to change this, but if you have to it can be
  39.     done with the following command line options (which can be put in a
  40.     config file).
  41.  
  42.     -pp=string  The preprocessor will be called like in
  43.                 printf(string,opts,infile,outfile), e.g. the default for vcpp
  44.                 searching the includes in vinclude: and defining __STDC__)
  45.                 is "-pp=vcpp -Ivinclude: -D__STDC__=1 %s %s >%s"
  46.  
  47.     -as=string  The same for the assembler. The default would be
  48.                 "-as=FreePhxAss opt ! quiet %s to %s".
  49.                 You probably don't have to change this.
  50.  
  51.     -rm=string  This is the string for the delete command and takes only
  52.                 one argument. The default would be "-rm=delete quiet %s".
  53.                 You probably don't have to change this.
  54.  
  55.     -ld=string  This is for the linker and takes three arguments. The first
  56.                 one are the object files (separated by spaces), the second
  57.                 one the user specified libraries and the last one the name
  58.                 of the resulting executable.
  59.                 This command has to link with vlib:startup.o as first object
  60.                 file and vlib:vc.lib and vlib:amiga.lib as the last libraries.
  61.                 The appropriate line for blink/slink would be
  62.                 "-ld=blink vlib:startup.o %s lib %s vlib:vc.lib vlib:amiga.lib
  63.                  to %s"
  64.                 For PhxLnk (default) you could use
  65.                 "-ld=PhxLnk vlib:startup.o %s %s vlib:vc.lib vlib:amiga.lib
  66.                  to %s"
  67.  
  68.     -l2=string  The same like -ld, but standard-startup and -libraries should
  69.                 not be linked; used when -nostdlib is specified.
  70.  
  71.  
  72.     All those strings should tell the command to omit any output apart from
  73.     error messages if possible. However for every of those options there
  74.     exists one with an additional 'v', i.e. -ppv=, -asv=, etc. which should
  75.     produce some output, if possible.
  76.     If vc is invoked with the -vv option the verbose commands will be called,
  77.     if not the quiet ones will be used.
  78.  
  79.  
  80. CONFIG
  81.  
  82.     vc looks for a config file named 'vc.config' in ENV: and VBCC:. If
  83.     it is found it will be treated as a collection of additional command
  84.     line arguments. Every line of the file will be used as one argument,
  85.     so no quoting shall be used and every argument must go in its own
  86.     line.
  87.     There should be an example vc.config.
  88.  
  89.  
  90. USAGE
  91.  
  92.     vc [options] file1 file2 ...
  93.  
  94.     Processes all files according to their suffix and links all objects
  95.     together (unless any of -E, -S, -c is specified). It recognizes the
  96.     following file types:
  97.  
  98.     .c      C source
  99.     .i      already preprocessed C source
  100.     .asm
  101.     .s      assembler source
  102.     .obj
  103.     .o      object file
  104.  
  105.     With dos.library >=36 pattern matching is supported.
  106.  
  107.     The options recognized by vc are:
  108.  
  109.     -v      verbose; print all commands
  110.  
  111.     -vv     very verbose; display some internals, too
  112.  
  113.     -Ox     optimization level
  114.             -O0 is equivalent to -O=0
  115.             -O  will activate some optimizations (at the moment -O=991)
  116.             -O2 will activate most optimizations (at the moment -O=1023)
  117.             -O3 will activate all  optimizations (at the moment -O=~0)
  118.  
  119.             Higher values may or may not activate even more optimizations.
  120.             The default is -O=1.
  121.             It is also possible to specify an exact value with -O=n.
  122.  
  123.     -o file save executable as file (default a.out); only works if the
  124.             target is an executable
  125.  
  126.     -E      do not compile, save the preprocessed C sources with .i suffix
  127.  
  128.     -S      do not assemble, save the compiled files with .asm suffix
  129.  
  130.     -c      do not link, .o suffix
  131.  
  132.     -k      keep all intermediate files; by default all generated files
  133.             except the source files and the targets are deleted
  134.  
  135.     -Dstr   #define a preprocessor symbol, e.g. -DAMIGA or -DCPU=68000;
  136.             at the moment this is passed through to the preprocessor
  137.  
  138.     -Ipath  add path to the include-search-path;
  139.             at the moment this is passed through to the preprocessor
  140.  
  141.     -lulib  link with library vlib:ulib.lib
  142.  
  143.     -nostdlib   do not link with standard-startup/libraries; useful only
  144.                 for people who know what they are doing
  145.  
  146.  
  147.     All other options are passed through to vbcc.
  148.  
  149.  
  150. Volker                                                  volker@vb.franken.de
  151.  
  152.